Derive model¶
Overview¶
Next Design not only can handle various models of software to be designed in one project, By creating a new model with an existing model as input, trace information between models is automatically recorded. You can save the trouble of adding trace information later.
The act of designing a new model with an existing model as input is called model derivation.
The metamodel definition and model derivation required for model derivation are described below in the following order.
- Define a derivation relationship in the metamodel so that the [Component Structure Model] can be derived from the [Use Case Model]
- Input [Use Case Model] and derive [Component Configuration Model]
- Add trace information between existing models
Image of derivation related definition
Image of model derivation and trace
1. Define derivation relationship in metamodel¶
To derive the Component Structural Model from the Use Case Model or to connect trace lines, define the derivation relationship between the entities as follows:
- Define the metamodel and view of [Component Structure Model] to be derived
- Define a derived relationship between the entities of [Use Case Model] and [Component Structure Model]
1.1 Define metamodel and view of component structure model¶
Define the metamodel of [Component Structure Model] to be derived with reference to the following class diagram.
Operating procedure
- For the procedure, refer to the above Quick Start> Profile Definition> Define Metamodel.
Define the Diagram view of [Component Structure Model] by referring to the following screen image.
Operating procedure
- For the procedure, refer to the above Quick Start> Profile Definition> Define Diagram View.
1.2 Define derivation relationship between use cases and components¶
To define a derived relationship between entities in the Use Case Model and the Component Structural Model, you define it using a class diagram, similar to defining a reference relationship.
For now, let's create a new class diagram that defines a derived relationship to illustrate only the entities it associates.
Derivation entity | Derivation entity |
---|---|
Component Structure Model> Component | Use Case Model> Use Case |
Operating procedure
- Add a class diagram to your profile and enter Derived Relationship Diagram as the name.
- Add an existing entity that connects the derived relationship to the class diagram from the Profile Navigator.
- Connect a derivation relationship from the derivation entity to the derivation source entity.
- By defining the derivation association, you can derive the model and add trace lines.
You have now defined a [use case model] metamodel that has [Actor] and [Use case] as components, and a derivable [component structure model] metamodel.
2. Derive components from use cases¶
To derive a new model with the existing model as input and trace information, follow the steps below.
- Display two models side by side
- Create model using input model components
2.1 Display two models side by side¶
Add model
Just as when adding [Use Case Model], add the [Component Structural Model] to be edited from the Model Navigator.
- Model to be edited: [Modeling sample]> [Design model]> [Component structure model]
Operating procedure
- First, right-click the project displayed at the top of the model navigator, From the context menu, click Add Model> Design Model, Add Design Model to the first level.
- Right-click the added [Design Model], From the context menu, click Add Model> Component Structural Model, Add the model to be edited.
- After adding the model in the model navigator, the model is displayed in the main editor and ready for editing.
Show model in subeditor
Follow the steps below to display the sub editor on the right side of the screen and the [Use Case Model] that is the input for model creation.
Operating procedure
- Click Display> Pane> Sub Editor on the ribbon.
- Select [Input] from the [Display mode] pull-down list at the top of the sub editor.
- Select [Use Case Model] from the pull-down list that is displayed to the right of it.
- If you want to swap the positions of the subeditor and the main editor, click Display> Pane> Swap Left and Right on the ribbon.
2.2 Create model using input model components¶
To derive a new model with an existing model as input and trace information, drag and drop the components of the input model as follows:
Operating procedure
- Move the pointer over the component of the existing model and drag the [+] icon displayed in the upper right corner.
- Drop it on the model to which it is derived and add the components to the model as well as the trace lines that represent the derivation relationships between the models.
3. Add trace information between existing models¶
To add trace information between existing model components, drop them on the [○] icon displayed in the upper left of the model component to which you are dragging.
Operating procedure
- Move the pointer over the component of the existing model and drag the [+] icon displayed in the upper right corner.
- Drop it on the [○] icon displayed in the upper left of the existing model to which the derivation relationship is to be attached.
- Drop to add a trace line that represents a derived relationship between existing model components.